package org.xilin

class GlobalVariableController {

    def semesterService

    def setActiveSemester = {
        //semesterService.setActiveSemester(Semester.load(params.semesterId))
        semesterService.setActiveSemester(Semester.read(params.semesterId))
        if (params.redirectAction) {
            redirect(controller: params.redirectController, action: params.redirectAction)
        }
        else {
            render "Semester changed"            
        }
    }
}
